/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/
/*
This files contains functions declarations related to user interface of HW assignment 1. 

Created by Amir Balva for the course "Introduction To Systems Programming", 
School of Electrical Engineering, Tel-Aviv University. winter 2014.
*/
/*oOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoO*/

#ifndef HW1_UI_H
#define HW1_UI_H

#include "HW1_Types.h"
#include <stdio.h>

/*
 * Initializes the UI module, Call this function before calling any other UI function. 
 * 
 * Input:
 * -----
 * A string used to initialize the UI module ( should be supplied to you from outside your program ).
 */ 
void Initilize_UI(const char * SetupString);
/*
 * Gets an Array of emails and loads it to internal UI memory.
 * 
 * Input:
 * -----
 * Email* email_array - an array of Email structs
 * int num_of_emails - number of emails in that array.
 *
 * Output:
 * -----
 * None
 */ 
void Load_Emails_To_UI_Memory(Email* email_array, int num_of_emails);

/*
 * Gets a new request from the user
 * 
 * Input:
 * -----
 * None
 *
 * Output:
 * -----
 *
 * Return Value:
 * a Request struct with the proper operation (and other required data)
 */ 
Request * Get_New_User_Request();

/*
 * Turns the Server Module off, and releases all resources.
 * IMPORTANT: this function should only be called if you have called
 * Server_Initialize() before.
 */ 
void Close_UI();

/*
 * Prints to screen all the emails loaded in UI's buffer, full version.
 */ 
void Print_Emails ();

/*
 * Prints to screen all the emails loaded in UI's buffer, brief version.
 */ 
void Print_Emails_Brief ();

#endif // HW1_UI_H